import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main, sim_items
from util import *

class Potion(sim_items.Potion):
    def __init__(self):
        sim_items.Potion.__init__(self, "sloth", "!",
                ('go', 'less'),
                idDescription="In large doses, this tincture can be used as "\
                    "an anaesthetic for rudimentary surgery. The more "\
                    "distilled form you now hold is widely used by miners "\
                    "during breaks to get thoroughly intoxicated.")

    def quaff(self, quaffer):
        self.amount = random.randint(2,8)
        self.duration = 30000

        main.schedule(sim.Event('decrease stat', main.schedule.time, (quaffer,
            'speedMod', self.amount), dests=[quaffer]))
        main.schedule(sim.Event('increase stat', main.schedule.time +\
            self.duration, (quaffer, 'speedMod', self.amount), dests=[quaffer]))
        main.schedule(sim.Event('statusNote+', main.schedule.time, (quaffer,
            'sloth'), dests=[quaffer]))
        main.schedule(sim.Event('statusNote-', main.schedule.time +\
            self.duration, (quaffer, 'sloth'), dests=[quaffer]))
        quaffer.identify(self)

#========================================
thingClass = Potion



